import { createStore, combineReducers, applyMiddleware } from 'redux';
import { allReducers, model, thunkMiddleware } from './model';
import { servicesMiddleWare } from './servicesMiddleWare';
import models from './models/index';
Object.keys(models).length > 0 &&
  Object.keys(models).forEach((key) => {
    model(models[key]);
  });
export default applyMiddleware(thunkMiddleware, servicesMiddleWare)(createStore)(combineReducers(allReducers));
